#include "./math_test.h"

TEST(Comparison, operatorLower_int_int1) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 2, final_value2 = 2;
	int value3 = 3, final_value3 = 3;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 < value2 < value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorLower_int_int2) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 2, final_value2 = 2;
	int value3 = 0, final_value3 = 0;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 < value2 < value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorLowerOrEqual_int_int1) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 2, final_value2 = 2;
	int value3 = 2, final_value3 = 2;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 <= value2 <= value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorLowerOrEqual_int_int2) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 0, final_value2 = 0;
	int value3 = 0, final_value3 = 0;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 <= value2 <= value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorGreater_int_int1) {

	// Arrange
	int value1 = 3, final_value1 = 3;
	int value2 = 2, final_value2 = 2;
	int value3 = 1, final_value3 = 1;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 > value2 > value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorGreater_int_int2) {

	// Arrange
	int value1 = 3, final_value1 = 3;
	int value2 = 2, final_value2 = 2;
	int value3 = 2, final_value3 = 2;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 > value2 > value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorGreaterOrEqual_int_int1) {

	// Arrange
	int value1 = 3, final_value1 = 3;
	int value2 = 3, final_value2 = 3;
	int value3 = 1, final_value3 = 1;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 >= value2 >= value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorGreaterOrEqual_int_int2) {

	// Arrange
	int value1 = 3, final_value1 = 3;
	int value2 = 4, final_value2 = 4;
	int value3 = 1, final_value3 = 1;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 >= value2 >= value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorEqual_int_int1) {

	// Arrange
	int value1 = 2, final_value1 = 2;
	int value2 = 2, final_value2 = 2;
	int value3 = 2, final_value3 = 2;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 == value2 == value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorEqual_int_int2) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 2, final_value2 = 2;
	int value3 = 2, final_value3 = 2;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 == value2 == value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorDifferent_int_int1) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 2, final_value2 = 2;
	int value3 = 1, final_value3 = 1;

	bool expected = true;

	// Act
	bool actual = ( cmp << value1 != value2 != value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

TEST(Comparison, operatorDifferent_int_int2) {

	// Arrange
	int value1 = 1, final_value1 = 1;
	int value2 = 1, final_value2 = 1;
	int value3 = 1, final_value3 = 1;

	bool expected = false;

	// Act
	bool actual = ( cmp << value1 != value2 != value3 );

	// Assert
	EXPECT_EQ( value1, final_value1 );
	EXPECT_EQ( value2, final_value2 );
	EXPECT_EQ( value3, final_value3 );
	EXPECT_EQ( expected, actual );

};

